<?php
namespace app\index\controller;

use think\Request;

class Index
{
    //检索系统首页
    public function index()
    {
        return view('index',['type'=>'ALL']);
    }

    //搜索+显示页
    public function search()
    {
        $keyword = input('post.keyword');
        $cid = input('post.cid');
        if(!empty($keyword)){
            return view('search',['keyword'=>$keyword, 'cid'=>$cid, 'type'=>'ALL']);
        }
    }

    //期刊检索页
    public function journal()
    {
        return view('publication',['type'=>'J']);
    }

    //会议检索页
    public function conference()
    {
        return view('publication',['type'=>'C']);
    }

    //报告检索页
    public function report()
    {
        return view('publication',['type'=>'R']);
    }

    //论文检索页
    public function dissertation()
    {
        return view('publication',['type'=>'D']);
    }

    //汇编检索页
    public function compile()
    {
        return view('publication',['type'=>'G']);
    }

    //技术标准检索页
    public function standard()
    {
        return view('publication',['type'=>'S']);
    }

    //专利文献检索页
    public function patent()
    {
        return view('publication',['type'=>'P']);
    }

    //专著文献检索页
    public function monograph()
    {
        return view('publication',['type'=>'M']);
    }

    //参考工具检索页
    public function tool()
    {
        return view('publication',['type'=>'K']);
    }

    //分库检索页
    public function catalog()
    {
        return view('catalog',['type'=>'CA']);
    }

    //文摘类分库检索
    public function ei()
    {
        return view('digest',['type'=>'14']);
    }

    public function inspec()
    {
        return view('digest',['type'=>'13']);
    }

    public function aero()
    {
        return view('digest',['type'=>'15']);
    }

    public function ntis()
    {
        return view('digest',['type'=>'12']);
    }

    public function kjwz()
    {
        return view('digest',['type'=>'16']);
    }

    //文章详细页
    public function article()
    {
        $type = input('get.type');
        $docid = input('get.docid');
        if(!empty($docid)){
            return view('article',['type'=>$type, 'docid'=>$docid]);
        }
    }

    //刊内文献列表
    public function publicationList()
    {
        $pid = input('get.pid');
        $type = input('get.type');
        if(!empty($pid)){
            return view('publicationlist',['pid'=>$pid,'type'=>$type]);
        }
    }
}
